配置 containerd 镜像仓库完全攻略 |
您所在的位置:网站首页 › Docker 配置内网私有仓库 › 配置 containerd 镜像仓库完全攻略 |
,需要为 endpoints 指定http://,否则将默认为 https。 无认证 如果你使用的是非安全(http)私有仓库,那么可以通过下面的参数来配置 K3s 连接私有仓库: root@ip-172-31-13-117:~# crictl pull 172.31.6.200:5000/my-ubuntu Image is up to date for sha256:9499db7817713c4d10240ca9f5386b605ecff7975179f5a46e7ffd59fff462ee然后可以通过 crictl 去 pull 镜像: root@ip-172-31-13-117:~# crictl pull 172.31.6.200:5000/my-ubuntu Image is up to date for sha256:9499db7817713c4d10240ca9f5386b605ecff7975179f5a46e7ffd59fff462ee接下来,再看一下 containerd 的配置,可以看到文件末尾追加了如下配置: root@ip-172-31-13-117:~# cat /var/lib/rancher/k3s/agent/etc/containerd/config.toml [plugins.cri.registry.mirrors] [plugins.cri.registry.mirrors."172.31.6.200:5000"] endpoint = ["http://172.31.6.200:5000"] [plugins.cri.registry.mirrors."rancher.ksd.top:5000"] endpoint = ["http://172.31.6.200:5000"]有认证 如果你的非安全(http)私有仓库带有认证,那么可以通过下面的参数来配置 k3s 连接私有仓库: root@ip-172-31-13-117:~# cat >> /etc/rancher/k3s/registries.yaml /etc/rancher/k3s/registries.yaml /etc/rancher/k3s/registries.yaml |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |